home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 131 / XENIATGM131.iso / Shareware / openOffice.org 641 / Windows / f_0250 / DialogModul.xba < prev    next >
Extensible Markup Language  |  2001-11-15  |  19KB  |  487 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
  3. <script:module xmlns:script="http://openoffice.org/2000/script" script:name="DialogModul" script:language="StarBasic">Option Explicit
  4.  
  5. Public Const bDebugWizard = False
  6.  
  7. Public Const SBFIRSTAPPLCHECKED = 0
  8. Public Const SBSECONDAPPLCHECKED = 1
  9. Public Const SBTHIRDAPPLCHECKED = 2
  10. Public Const SBFOURTHAPPLCHECKED = 3
  11. Public WizardMode as String
  12. Public Const SBMICROSOFTMODE = "MS"
  13. Public Const SBXMLMODE = "SO"
  14. ' The absolute maximal Number of possible Applications
  15. Public Const Twip = 425
  16. Public Const SBMAXAPPLCOUNT = 4
  17. Public MaxApplCount as Integer
  18. Public CurOffice As Integer
  19. Public SOBitmapPath As String
  20. Public SOWorkPath As String
  21. Public SOTemplatePath as String
  22. Public bCancelTask As Boolean
  23. Public bDoKeepApplValues as Boolean
  24. Public iApplSection as Integer
  25. Public oUcb as Object
  26. Public PathSeparator as String
  27.  
  28. Public ApplCount as Integer
  29. Public sKeyName(SBMAXAPPLCOUNT-1) as String
  30. Public sValueName(SBMAXAPPLCOUNT-1) as String
  31. Public sCRLF as String
  32. Public MSFilterName(5,2) as String
  33. Public XMLFilterName(7,2)
  34.  
  35. ' e.g.:
  36. ' XMLFilterName(x,0) = "sdw"                         ' in documents we take the extensions; in SO-templates the appropriate Filtername
  37. ' XMLFilterName(x,1) = "swriter: StarWriter 5.0"     ' the filtername of the target-format
  38. ' XMLFilterName(x,2) = "sxw"                         ' the target extension
  39.  
  40. Public Applications(SBMAXAPPLCOUNT-1,9)
  41.  
  42. Public Const SBAPPLCONVERT = 0
  43. Public Const SBDOCCONVERT = 1
  44. Public Const SBDOCRECURSIVE = 2
  45. Public Const SBDOCSOURCE = 3
  46. Public Const SBDOCTARGET = 4
  47. Public Const SBTEMPLCONVERT = 5
  48. Public Const SBTEMPLRECURSIVE = 6
  49. Public Const SBTEMPLSOURCE = 7
  50. Public Const SBTEMPLTARGET = 8
  51. Public Const SBAPPLKEY = 9
  52.  
  53. ' Application-relating Data are stored in this Array
  54. ' according to the following structure:
  55. ' Applications(X,0) = True/False         (Application is to be converted)
  56. ' Applications(X,1) = True/False         (Documents are to be converted)
  57. ' Applications(X,2) = True/False        (Including Subdirectories)
  58. ' Applications(X,3) = "File:///..."        (SourceUrl of the documents)
  59. ' Applications(X,4) = "File///:..."        (TargetUrl of the documents)
  60. ' Applications(X,5) = True/False        (Templates are to be converted)
  61. ' Applications(X,6) = True/False         (Including Subdirectories)
  62. ' Applications(X,7) = "File:///..."        (SourceUrl of the templates)
  63. ' Applications(X,8) = "File:///..."     (TargetUrl of the templates)
  64. ' Applications(X,9) = 0                    (Key to the original Index of the Applications)
  65.  
  66.  
  67. Sub FillStep_Welcome()
  68. Dim i as Integer
  69. '    bDoKeepApplValues = False
  70.     ImportDialogArea.Title = sTitle
  71.     With ImportDialog
  72.         .cmdHelp.Label = sHelpButton
  73.         .cmdCancel.Label = sCancelButton
  74.         .cmdBack.Label = sBackButton
  75.         .cmdGoOn.Label = sNextButton
  76.         .WelcomeTextLabel.Label = sWelcomeTextLabel1
  77.         .WelcomeTextLabel2.Label = sWelcomeTextLabel2
  78.         .WelcomeTextLabel3.Label = sWelcomeTextLabel3
  79.  
  80.         .optMSDocuments.Label = sContainerName(0)
  81.         .chkMSApplication1.Label = sMsDocumentCheckbox(0)
  82.         .chkMSApplication2.Label = sMsDocumentCheckbox(1)
  83.         .chkMSApplication3.Label = sMsDocumentCheckbox(2)
  84.  
  85.         .optSODocuments.Label = sContainerName(1)
  86.         .chkSOApplication1.Label = sSODocumentCheckbox(0)
  87.         .chkSOApplication2.Label = sSODocumentCheckbox(1)
  88.         .chkSOApplication3.Label = sSODocumentCheckbox(2)
  89.         .chkSOApplication4.Label = sSODocumentCheckbox(3)
  90.         .cmdBack.Enabled = False
  91.         .Step = 1
  92.     End With
  93.     CheckModuleInstallation()        
  94.     ToggleNextButton()
  95. End Sub
  96.  
  97.  
  98. Sub FillStep_InputPaths(OfficeIndex as Integer, bStartup as Boolean)
  99. Dim Index as Integer
  100. Dim oNullObject as Object
  101.     If bStartup And Not bDoKeepApplValues Then
  102.         If ImportDialog.optMSDocuments.State = 1 Then
  103.             SetupMSConfiguration()
  104.         Else
  105.             SetupXMLConfiguration()
  106.         End If
  107.         ' chkTemplatePath-Captions
  108.         GetApplResourceArray(1009 + iApplSection, ApplCount, sTemplateCheckBox())
  109.         ' DocumentCheckbox- Captions
  110.         GetApplResourceArray(1009 + iApplSection + ApplCount, ApplCount, sDocumentCheckBox())
  111.         FillUpApplicationList()
  112.     End If
  113.     CurOffice = OfficeIndex
  114.     Index = Applications(CurOffice,SBAPPLKEY)
  115.     InitializePathsforCurrentApplication(Index)
  116.     With ImportDialog
  117.         .chkTemplatePath.Label = sTemplateCheckbox(Index)
  118.         .chkDocumentPath.State = Abs(Applications(CurOffice,SBDOCCONVERT))
  119.         .chkDocumentSearchSubDir.State = Abs(Applications(CurOffice,SBDOCRECURSIVE))
  120.         .txtDocumentImportPath.Text = ConvertFromUrl(Applications(CurOffice,SBDOCSOURCE))
  121.         .txtDocumentExportPath.Text = ConvertFromUrl(Applications(CurOffice,SBDOCTARGET))
  122.         .hlnDocuments.Label = sProgressMoreDocs
  123.         If WizardMode = SBXMLMODE Then
  124.             ImportDialogArea.Title = sTitle & " - " & sSODocumentCheckBox(Index)
  125.         Else
  126.             ImportDialogArea.Title = sTitle & " - " & sMSDocumentCheckBox(Index)
  127.         End If
  128.         If WizardMode = SBXMLMODE AND Index = 3 Then
  129.             ' Note: SO-Helper Applications are partly treated like templates although they only have documents
  130.             .hlnTemplates.Label = sProgressMoreDocs
  131.             .chkTemplatePath.Label = sSOHelperDocuments(0,0)
  132.             .chkTemplatePath.Enabled = oFactoriesAccess.HasByName(sSOHelperDocuments(0,1))
  133.             .chkDocumentPath.Label = sSOHelperDocuments(1,0)
  134.             .chkDocumentPath.Enabled = oFactoriesAccess.HasByName(sSOHelperDocuments(1,1))
  135.         Else
  136.             .chkTemplatePath.Enabled = True
  137.             .chkDocumentPath.Enabled = True
  138.             .chkTemplatePath.Label = sTemplateCheckbox(Index)
  139.             .chkDocumentPath.Label = sDocumentCheckbox(Index)
  140.             .hlnTemplates.Label = sProgressMoreTemplates
  141.         End If
  142.         .chkTemplatePath.State = Abs(Applications(CurOffice,SBTEMPLCONVERT))
  143.         ToggleInputPaths(oNullObject,"Template")
  144.         ToggleInputPaths(oNullObject,"Document")        
  145.         .chkTemplateSearchSubDir.State = Abs(Applications(CurOffice,SBTEMPLRECURSIVE))
  146.         .txtTemplateImportPath.Text = ConvertFromUrl(Applications(CurOffice,SBTEMPLSOURCE))
  147.         .txtTemplateExportPath.Text = ConvertFromUrl(Applications(CurOffice,SBTEMPLTARGET))
  148.         .cmdGoOn.Label = sNextButton
  149.         .cmdBack.Enabled = True
  150.         ImportDialog.Step = 2
  151.     End With
  152.     ToggleNextButton()
  153. End Sub
  154.  
  155.  
  156. Sub FillUpApplicationList()
  157. Dim i as Integer
  158. Dim a as Integer
  159. Dim BoolValue as Boolean
  160.     If Not bDoKeepApplValues Then
  161.         a = 0
  162.         For i = 1 To ApplCount
  163.             If ImportDialog.optMSDocuments.State = 1 Then
  164.                 BoolValue = ImportDialogArea.GetControl("chkMSApplication" & i).Model.State = 1
  165.             Else
  166.                 BoolValue = ImportDialogArea.GetControl("chkSOApplication" & i).Model.State = 1
  167.             End If
  168.             Applications(a,SBAPPLCONVERT) = BoolValue
  169.             Applications(a,SBDOCCONVERT) = BoolValue
  170.             Applications(a,SBDOCRECURSIVE) = BoolValue
  171.             Applications(a,SBDOCSOURCE) = ""            ' GetDefaultPath(i)
  172.             Applications(a,SBDOCTARGET) = ""            ' SOWorkPath
  173.             Applications(a,SBTEMPLCONVERT) = BoolValue
  174.             Applications(a,SBTEMPLRECURSIVE) = BoolValue
  175.             Applications(a,SBTEMPLSOURCE) = ""             ' GetTemplateDefaultPath(i)
  176.             Applications(a,SBTEMPLTARGET) = ""             ' GetTargetTemplatePath(i)
  177.             Applications(a,SBAPPLKEY) = i-1
  178.             If BoolValue Then 
  179.                 a = a + 1
  180.             End If
  181.         Next i
  182.         ApplCount = a
  183.     End If
  184. End Sub
  185.  
  186.  
  187. Sub InitializePathsforCurrentApplication(i as Integer)
  188.     AssignPathToCurrentApplication(SBDOCSOURCE, GetDefaultPath(i))
  189.     AssignPathToCurrentApplication(SBDOCTARGET, SOWorkPath)
  190.     AssignPathToCurrentApplication(SBTEMPLSOURCE, GetTemplateDefaultPath(i))
  191.     AssignPathToCurrentApplication(SBTEMPLTARGET, GetTargetTemplatePath(i))
  192. End Sub
  193.  
  194.  
  195. Sub AssignPathToCurrentApplication(Index as Integer, NewPath as String)
  196.     If Applications(CurOffice,Index) = "" Then
  197.         If CurOffice > 0 Then
  198.             Applications(CurOffice,Index) = Applications(CurOffice-1,Index)
  199.         Else
  200.             Applications(CurOffice,Index) = NewPath
  201.         End If
  202.     End If
  203. End Sub
  204.  
  205.  
  206. Sub SaveStep_InputPath()
  207.     Applications(CurOffice,SBDOCCONVERT)  = ImportDialog.chkDocumentPath.State = 1
  208.     Applications(CurOffice,SBDOCRECURSIVE)  = ImportDialog.chkDocumentSearchSubDir.State = 1
  209.     Applications(CurOffice,SBDOCSOURCE)  = ConvertToURL(ImportDialog.txtDocumentImportPath.Text)
  210.     Applications(CurOffice,SBDOCTARGET) = ConvertToUrl(ImportDialog.txtDocumentExportPath.Text)
  211.     Applications(CurOffice,SBTEMPLCONVERT) = ImportDialog.chkTemplatePath.State = 1
  212.     Applications(CurOffice,SBTEMPLRECURSIVE) = ImportDialog.chkTemplateSearchSubDir.State = 1
  213.     Applications(CurOffice,SBTEMPLSOURCE) = ConvertToURL(ImportDialog.txtTemplateImportPath.Text)
  214.     Applications(CurOffice,SBTEMPLTARGET) = ConvertToURL(ImportDialog.txtTemplateExportPath.Text)
  215. End Sub
  216.  
  217.  
  218. Sub ToggleInputPaths(aEvent as Object, Optional sDocType)
  219. Dim bDoEnable as Boolean
  220. Dim sLocDocType as String
  221. Dim oCheckBox as Object
  222.     If Not IsNull(aEvent) Then
  223.         sLocDocType = aEvent.Source.Model.Tag
  224.     Else
  225.         sLocDocType = sDocType
  226.     End If
  227.     With ImportDialogArea
  228.         oCheckBox = .GetControl("chk" & sLocDocType & "Path").Model
  229.         bDoEnable = oCheckBox.State = 1 And oCheckBox.Enabled
  230.         .GetControl("lbl" & sLocDocType & "Import").Model.Enabled = bDoEnable
  231.         .GetControl("lbl" & sLocDocType & "Export").Model.Enabled = bDoEnable
  232.         .GetControl("txt" & sLocDocType & "ImportPath").Model.Enabled = bDoEnable
  233.         .GetControl("txt" & sLocDocType & "ExportPath").Model.Enabled = bDoEnable
  234.         .GetControl("chk" & sLocDocType & "SearchSubDir").Model.Enabled = bDoEnable
  235.         .GetControl("cmd" & sLocDocType & "Import").Model.Enabled = bDoEnable
  236.         .GetControl("cmd" & sLocDocType & "Export").Model.Enabled = bDoEnable
  237.     End With
  238.     ToggleNextButton()
  239. End Sub
  240.  
  241.  
  242. Function MakeSummaryString()
  243. Dim sTmpText As String
  244. Dim i as Integer
  245. Dim Index as Integer
  246. Dim sAddText as String
  247.     For i = 0 To ApplCount -1
  248.         Index = Applications(i,SBAPPLKEY)
  249.         If     Applications(i,SBTEMPLCONVERT) Then
  250.             ' Templates are to be converted
  251.             sAddText = ""
  252.             If WizardMode = SBMICROSOFTMODE Then
  253.                 sAddText = sSumMSTemplates(Index) & sCRLF
  254.             Else
  255.                 sAddText = sSumSOTemplates(Index) & sCRLF            
  256.             End If
  257.             sTmpText = sTmpText & sAddText &  ConvertFromUrl(Applications(i,SBTEMPLSOURCE)) & sCRLF
  258.             If Applications(i,SBTEMPLRECURSIVE) Then
  259.                 ' Including Subdirectories
  260.                 sTmpText = sTmpText & sSumInclusiveSubDir & sCRLF
  261.             End If
  262.             sTmpText = sTmpText & sSumSaveDocuments & sCRLF
  263.             sTmpText = sTmpText & ConvertFromUrl(Applications(i,SBTEMPLTARGET)) & sCRLF
  264.             sTmpText = sTmpText & sCRLF
  265.         End If
  266.  
  267.         If Applications(i,SBDOCCONVERT) Then
  268.             ' Documents are to be converted
  269.             If WizardMode = SBMICROSOFTMODE Then
  270.                 sAddText = sSumMSDocuments(Index) & sCRLF
  271.             Else
  272.                 sAddText = sSumSODocuments(Index) & sCRLF            
  273.             End If
  274.             sTmpText = sTmpText & sAddText & ConvertFromUrl(Applications(i,SBDOCSOURCE)) & sCRLF
  275.  
  276.             If Applications(i,SBDOCRECURSIVE) Then
  277.                 ' Including Subdirectories
  278.                 sTmpText = sTmpText & sSumInclusiveSubDir & sCRLF
  279.             End If
  280.  
  281.             sTmpText = sTmpText & sSumSaveDocuments & sCRLF
  282.             sTmpText = sTmpText & ConvertFromUrl(Applications(i,SBDOCTARGET)) & sCRLF
  283.             sTmpText = sTmpText & sCRLF
  284.         End If
  285.     Next i
  286.     MakeSummaryString = sTmpText
  287. End Function
  288.  
  289.  
  290. Sub FillStep_Summary()
  291. ' Todo: Angabe ├╝ber die Vorlagengruppen,bzw. Template-Exportpfad
  292.     ImportDialogArea.Title = sTitle
  293.     With ImportDialog
  294.         .SummaryTextbox.Text = MakeSummaryString()
  295.         .cmdGoOn.Enabled = .SummaryTextbox.Text <> ""
  296.         .cmdGoOn.Label = sBeginButton
  297.         .SummaryHeaderLabel.Label = sSummaryHeader
  298.         .Step = 3
  299.     End With
  300. End Sub
  301.  
  302.  
  303. Sub FillStep_Progress()
  304.     With ImportDialog
  305.         .cmdBack.Enabled = False
  306.         .cmdGoOn.Enabled = False
  307.         .hlnProgress.Label = sProgressPage_1
  308.         .LabelRetrieval.FontWeight = com.sun.star.awt.FontWeight.BOLD
  309.             .LabelRetrieval.Label = sProgressPage_2
  310.             .LabelCurProgress.Label = sProgressPage_3
  311.             .LabelCurDocumentRetrieval.Label = ""
  312.             .LabelCurTemplateRetrieval.Label = ""
  313.            .LabelCurDocument.Label = ""
  314.         .Step = 4
  315.     End With
  316. End Sub
  317.  
  318.  
  319. Sub    SetupMSConfiguration()
  320.     iApplSection = 0
  321.     Wizardmode = SBMICROSOFTMODE
  322.     MaxApplCount = 3
  323.     ApplCount = 3
  324.  
  325.     sKeyName(0) = "Software\Microsoft\Office\8.0\Word\Options"
  326.     sKeyName(1) = "Software\Microsoft\Office\8.0\Excel\Microsoft Excel"
  327.     sKeyName(2) = "Software\Microsoft\Office\8.0\PowerPoint\Recent Folder List\Default"
  328.  
  329.     sValueName(0) = "DOC-PATH"
  330.     sValueName(1) = "DefaultPath"
  331.     sValueName(2) = ""
  332.  
  333. ' See definition of Filtername-Array about meaning of fields
  334.     MSFilterName(0,0) = "doc"
  335.     MSFilterName(0,1) = "swriter: StarOffice XML (Writer)"
  336.     MSFilterName(0,2) = "sxw"
  337.  
  338.     MSFilterName(1,0) = "xls"
  339.     MSFilterName(1,1) = "scalc: StarOffice XML (Calc)"
  340.     MSFilterName(1,2) = "sxc"
  341.  
  342.     MSFilterName(2,0) = "ppt"
  343.     MSFilterName(2,1) = "simpress: StarOffice XML (Impress)"
  344.     MSFilterName(2,2) = "sxi"
  345.  
  346.     MSFilterName(3,0) = "dot"
  347.     MSFilterName(3,1) = "swriter: writer_StarOffice_XML_Writer_Template"
  348.     MSFilterName(3,2) = "stw"
  349.  
  350.     MSFilterName(4,0) = "xlt"
  351.     MSFilterName(4,1) = "scalc: calc_StarOffice_XML_Calc_Template"
  352.     MSFilterName(4,2) = "stc"
  353.  
  354.     MSFilterName(5,0) = "pot"
  355.     MSFilterName(5,1) = "simpress: impress_StarOffice_XML_Impress_Template"
  356.     MSFilterName(5,2) = "sti"
  357. End Sub
  358.  
  359.  
  360.  
  361. Sub SetupXMLConfiguration()
  362.     iApplSection = 1000
  363.     Wizardmode = SBXMLMODE
  364.     ApplCount = 4
  365.     MaxApplCount = 4
  366.  
  367.     XMLFilterName(0,0) = "sdw"
  368.     XMLFilterName(0,1) = "swriter: StarOffice XML (Writer)"
  369.     XMLFilterName(0,2) = "sxw"
  370.  
  371.     XMLFilterName(1,0) = "sdc"
  372.     XMLFilterName(1,1) = "scalc: StarOffice XML (Calc)"
  373.     XMLFilterName(1,2) = "sxc"
  374. ' Todo: Gepacktes 'sdp' Format ber├╝cksichtigen
  375.     XMLFilterName(2,0) = "sdd|sda"
  376.     XMLFilterName(2,1) = "simpress: StarOffice XML (Impress)|sdraw: StarOffice XML (Draw)"
  377.     XMLFilterName(2,2) = "sxi|sxd"
  378.  
  379.     XMLFilterName(3,0) = "smf"
  380.     XMLFilterName(3,1) = "smath: StarOffice XML (Math)"
  381.     XMLFilterName(3,2) = "sxm"
  382.  
  383.     XMLFilterName(4,0) = "application/vnd.stardivision.writer;application/x-starwriter|application/vnd.stardivision.writer/web"
  384.     XMLFilterName(4,1) = "swriter: writer_StarOffice_XML_Writer_Template|swriter/web: writer_web_StarOffice_XML_Writer_Web_Template"
  385.     XMLFilterName(4,2) = "stw|stw"
  386.  
  387.     XMLFilterName(5,0) = "application/vnd.stardivision.calc;application/x-starcalc"
  388.     XMLFilterName(5,1) = "scalc: calc_StarOffice_XML_Calc_Template"
  389.     XMLFilterName(5,2) = "stc"
  390.  
  391.     XMLFilterName(6,0) = "application/vnd.stardivision.impress;application/x-starimpress|application/vnd.stardivision.draw;application/x-stardraw"
  392.     XMLFilterName(6,1) = "simpress: impress_StarOffice_XML_Impress_Template|sdraw: draw_StarOffice_XML_Draw_Template"
  393.     XMLFilterName(6,2) = "sti|std"
  394.  
  395.     XMLFilterName(7,0) = "sgl"
  396.     XMLFilterName(7,1) = "swriter/GlobalDocument: writer_globaldocument_StarOffice_XML_Writer_GlobalDocument"
  397.     XMLFilterName(7,2) = "sxg"
  398. End Sub
  399.  
  400.  
  401. Function CheckControlPath(oCheckbox as Object, oTextBox as Object, ByVal bDoEnable as Boolean)
  402. Dim sPath as String
  403.     If Not bDoEnable Then
  404.         CheckControlPath = False
  405.     ElseIf oCheckbox.State = 0 Then
  406.         CheckControlPath = True
  407.     Else
  408.         sPath = ConvertToUrl(Trim(oTextBox.Text)
  409.         CheckControlPath = oUcb.Exists(sPath)
  410.     End If
  411. End Function
  412.  
  413.  
  414. Function CheckInputPaths() as Boolean
  415. Dim bChangePage as Boolean
  416.     bChangePage = CheckTextBoxPath(ImportDialog.txtTemplateImportPath, True, False)
  417.     bChangePage = CheckTextBoxPath(ImportDialog.txtTemplateExportPath, bChangePage, True)
  418.     bChangePage = CheckTextBoxPath(ImportDialog.txtDocumentImportPath, bChangePage, False)
  419.     bChangePage = CheckTextBoxPath(ImportDialog.txtDocumentExportPath, bChangePage, True)
  420.     CheckInputPaths = bChangePage
  421. End Function
  422.  
  423.  
  424. Function CheckTextBoxPath(oTextBox as Object, ByVal bCheck as Boolean, bCreateNew as Boolean) as Boolean
  425. Dim iCreate as Integer
  426. Dim sQueryMessage as String
  427. Dim sUrlPath as String
  428. Dim sMessageNoDir as String
  429. Dim sShowPath as String
  430.     If oTextBox.Enabled Then
  431.         If bCheck Then
  432.             sShowPath = oTextBox.Text
  433.             sUrlPath = ConvertToUrl(sShowPath)
  434.             If Not oUcb.Exists(sUrlPath) Then
  435.                 If Not bCreateNew Then
  436.                     ' Sourcedirectories must be existing, Targetdirectories may be created new
  437.                     sQueryMessage = ReplaceString(sMsgDirNotThere, sShowPath,"%1")
  438.                     Msgbox(sQueryMessage,16,sTitle)
  439.                     CheckTextBoxPath() = False
  440.                     Exit Function
  441.                 Else
  442.                     sQueryMessage = ReplaceString(sMsgDirNotThere, sShowPath,"%1")
  443.                     sQueryMessage = sQueryMessage & Chr(13) & sQueryForNewCreation
  444.                     iCreate = Msgbox (sQueryMessage, 36, sTitle)
  445.                     If iCreate = 6 Then
  446.                         On Local Error Goto NOVALIDPATH
  447.                         oUcb.CreateFolder(sUrlPath)
  448.                         If Not oUcb.Exists(sUrlPath) Then
  449.                             Goto NOVALIDPATH
  450.                         End If
  451.                     Else
  452.                         CheckTextBoxPath() = False
  453.                         Exit Function
  454.                     End If
  455.                 End If
  456.             End If
  457.             CheckTextBoxPath() = True
  458.         Else
  459.             CheckTextBoxPath() = False
  460.         End If
  461.     Else
  462.         CheckTextBoxPath() = True
  463.     End If
  464.     Exit Function
  465. NOVALIDPATH:
  466.     sMessageNoDir = ReplaceString(sNoDirCreation, sShowPath, "%1")
  467.     Msgbox(sMessageNoDir, 16, sTitle)
  468.     CheckTextBoxPath() = False
  469. End Function
  470.  
  471.  
  472. Sub InitializeProgressPage(oDialog as Object)
  473.   'oDialog.LabelRetrieval.Label = ""
  474.   'oDialog.LabelCurProgress.Label = ""
  475.   oDialog.LabelRetrieval.FontWeight = com.sun.star.awt.FontWeight.NORMAL
  476.   oDialog.LabelCurProgress.FontWeight = com.sun.star.awt.FontWeight.BOLD
  477. End Sub
  478.  
  479.  
  480. Sub TakoverFolderName(aEvent as Object)
  481. Dim RefControlName as String
  482. Dim oRefControl
  483.     RefControlName = aEvent.Source.Model.Tag
  484.     oRefControl = ImportDialogArea.GetControl(RefControlName)
  485.     GetFolderName(oRefControl.Model)
  486.     ToggleNextButton()
  487. End Sub</script:module>